<?php use_helper("I18N") ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>

    <title><?php echo __("Fortrend") ?></title>

    <link rel="shortcut icon" href="/favicon.ico"/>
    <link href="/css/style_<?php echo $sf_user->getCulture() ?>.css" rel="stylesheet" rev="stylesheet" type="text/css" charset="utf-8"/>

    <script src="/js/pagetop.js" type="text/javascript" charset="utf-8"></script>
    <script src="/js/jquery-1.11.2.min.js" type="text/javascript" charset="utf-8"></script>

</head>
<body class="<?php echo (has_slot("body_class") ? include_slot("body_class") : "index") ?>">

<div class="wrapper">

    <div class="header">
        <a href="/home" class="brandinglogo" title="<?php echo __("Fortrend") ?>"><?php echo __("Fortrend") ?></a>

        <ul class="language">
            <li><a href="/home/language?lang=en">English</a></li>
            <li><a href="/home/language?lang=cn">中文</a></li>
        </ul>

        <div class="newssearch" style="display: none;">
            <input name="" type="text" id="input_newssearch" value="News Search" onblur="if (this.value=='')this.value='News Search'" onfocus="if (this.value=='News Search')this.value=''"/>
            <a href="javascript:void(0)" onclick="if (document.getElementById('input_newssearch').value!='' && document.getElementById('input_newssearch').value!='News Search'){top.location='/news/news.aspx?keyword='+encodeURIComponent(document.getElementById('input_newssearch').value)}else{alert('请输入要搜索的文字!')}" class="btn_search" title="搜索">搜索</a>
        </div>

        <?php include_component("component", "submenu") ?>

    </div>

    <div id="banner"></div>

    <div class="main <?php echo (has_slot("main_class") ? include_slot("main_class") : "") ?>">
        <?php echo $sf_data->getRaw('sf_content') ?>
    </div>

    <div class="footer">
        <ul class="sitelink">
            <li><a href="/home/statement" title="<?php echo __("Legal Notices") ?>"><?php echo __("Legal Notices") ?></a></li>
            <li><a href="/home/sitemap" title="<?php echo __("Site Map") ?>"><?php echo __("Site Map") ?></a></li>
            <li><a href="/contact_us/careers" title="<?php echo __("Careers") ?>"><?php echo __("Careers") ?></a></li>
        </ul>
        <div class="copyright">&copy; <?php echo __("2012 Fortrend | All rights reserved.") ?></div>
    </div>

</div>

<div id="bannerbg"></div>

<script src="/js/pageend.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(document).ready(function() {
        var mod = "/<?php echo $sf_context->getModuleName() ?>";
        var act = "/<?php echo $sf_context->getActionName() ?>";

        if (act == "/index") {
            act = "";
        }

        var url = mod + act;

        initActiveMenu(url);
        initLeftMenu(url);

        function initActiveMenu(url) {
            var menu = $("ul#menu > li.show_container > div.show_content > ul > li > a[href$=\"" + url + "\"]");

            if (menu.length) {
                menu.parent().parent().parent().parent().addClass("current");
                return;
            }

            menu = $("ul#menu > li.show_container > a[href$=\"" + url + "\"]");

            if (menu.length) {
                menu.parent().addClass("current");
                return;
            }
        }

        function initLeftMenu(url) {
            if ($("div.aside").length) {
                var menu = $("div.aside ul#submenu li a[href$=\"" + url + "\"]");
                menu.parent().addClass("current");
            }
        }
    });
</script>

</body>
</html>
